package com.atguigu.yygh.hosp.client;

import com.atguigu.yygh.vo.hosp.ScheduleOrderVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @author 孔德成
 * @slogan 致敬大师，致敬未来的你
 * @date 2021/9/13 8:24 下午
 * @desc
 */
@FeignClient("service-hosp")
@Repository
public interface HospitalFeignClient {
    /**
     * 根据排班id获取预约下单数据
     *
     * @param scheduleId
     * @return
     */
    @GetMapping("/api/hosp/hospital/inner/getScheduleOrderVo/{scheduleId}")
    ScheduleOrderVo getScheduleOrderVo(
            @PathVariable("scheduleId") String scheduleId);


    // 根据医院编号获取医院签名
    @PutMapping("/admin/hosp/hospitalSet/getSignKey/{hoscode}")
    String getSignKey(@PathVariable("hoscode") String hoscode);

    // 根据医院编号获取接口回调地址
    @PutMapping("/admin/hosp/hospitalSet/getApiUrl/{hoscode}")
    String getApiUrl(@PathVariable("hoscode") String hoscode);
}
